﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dooshion.Log
{
    public class LoggerManager
    {  
        //日志对象容器
        private static Dictionary<string, Log> loglist = new Dictionary<string, Log>(); 

        /// <summary>
        /// 根据类名获取容器中的日志对象
        /// </summary>
        /// <param name="className">类名</param>
        /// <returns>要跟踪的日志对象</returns>
        public static Log GetLogger(string className)
        {
            if (!loglist.ContainsKey(className))
            {
                loglist.Add(className, new Log(className));
            } 
            return loglist[className];
        } 
    }
}
